<template>
	<view class="content">
		<view class="userhead">
			<image class="useravatar" :src="user.avatar" mode=""></image>
			<view class="user_info">
				<view class="user_info_name">{{user.nickname}}</view>
				<view class="user_info_endtime">余额: {{user.money}}</view>
			</view>
		</view>
		
	
		
		<view class="menulist" @click="moreurl">
			<view class="menulist_a">
				<text class="iconfont icon-zifuchuantihuan_2"></text>
			</view>
			<view class="menulist_b">
				<view class="menulist_b1">
					余额
				</view>
				<text class="iconfont icon-gengduo"></text>
			</view>
		</view>
		
		<view class="menulist" @click="seeapi">
			<view class="menulist_a">
				<text class="iconfont icon-lianjie"></text>
			</view>
			<view class="menulist_b">
				<view class="menulist_b1">
					设置信息
				</view>
				<text class="iconfont icon-gengduo"></text>
			</view>
		</view>
		

		
		<view class="menulist" @tap="exit">
			<view class="menulist_a">
				<text class="iconfont icon-shezhi"></text>
			</view>
			<view class="menulist_b" >
				<view class="menulist_b1">
					退出登录
				</view>
				<text class="iconfont icon-gengduo"></text>
			</view>
		</view>
		
	</view>
</template>

<script>
	
	import {curl} from 'common/api.js';
	export default {
		data() {
			return {
				user:[]
			}
		},
		onShow() {
			var that=this;
			curl('user/index', {}).then((res) => {
				console.log(res.data);
				that.user=res.data
			});
				
			
			
	
			
		},
		methods: {
			exit(){
				uni.setStorageSync('token','');
				uni.navigateTo({
					url:'/pages/login/login'
				})
			},
			seeapi(){
				uni.navigateTo({
					url:'/pages/member/info'
				})
			},
			moreurl(){
				uni.navigateTo({
					url:'/pages/member/moreurl'
				})
				
			}
		}
	}
</script>

<style>
@import url('@/static/css/me.css');
</style>
